// Mind the "Stacking Contexts" problem: https://philipwalton.com/articles/what-no-one-told-you-about-z-index/
// https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index
// https://developer.mozilla.org/en-US/docs/Web/CSS/isolation
z($e) {
  $z-index = null;
  for $sublist, $i in $z-index-list {
    if index($sublist, $e) != null {
      $z-index = index($sublist, $e)+$i*100;
    }
  }

  if ($z-index!=null) {
    return $z-index;
  } else {
    error('Missing element "'+$e+'" in $z-index-list');
  }
}

$z-index-list = \
  (placeholder),
  (main-pane-view modal-container),
  (pane-layout-overlay pane-resize-bar),
  (filetree-node-bg filetree-node-label),
  (modal-backdrop modal),
  (context-menu menu menu-bar-item-container),
  (utilities-container),
  (workspace-list);


